package org.jgs1904.oopbase.practice.inherit;

/**
 * Learn Java from https://www.liaoxuefeng.com/
 *
 * @author liaoxuefeng
 * <p>
 * 继承练习
 * 定义PrimaryStudent，从Student继承，并新增一个grade字段：
 */
public class Main {

    public static void main(String[] args) {
        Person p = new Person("小明", 12);
        Student s = new Student("小红", 20, 99);
        // TODO: 定义PrimaryStudent，从Student继承，新增grade字段:
        Student ps = new PrimaryStudent("小军", 9, 100, 5);
        System.out.println(ps.getScore());
    }

}
